from flask import Flask, request, render_template, url_for

app = Flask(__name__)

@app.route('/')
def welcome():
    return 'Welcome to my Flask app!'

@app.route('/user/<username>')
def user(username):
    return f'Hello, {username}!'

@app.route('/redirect_to_user')
def redirect_to_user():
    url = url_for('user', username='FlaskUser')
    return render_template('hello.html', url=url)

@app.route('/signin', methods=['POST'])
def signin():
    username = request.form['username']
    return f'Signed in as {username}'

@app.route('/signin_get', methods=['GET'])
def signin_get():
    username = request.args.get('username')
    return f'Signed in as {username} via GET'

if __name__ == '__main__':
    app.debug = True
    app.run(host='0.0.0.0', port=6008)
